import { notification } from 'antd'
import type { ArgsProps } from 'antd/lib/notification'

// cms统一提示风格组件
const tips = {
  /**
   * 成功提示
   */
  success: (msg: string, arg?: ArgsProps) => {
    notification.success({
      message: msg,
      ...arg,
    })
  },

  /**
   * 错误提示
   */
  error: (msg: string, arg?: ArgsProps) => {
    notification.error({
      message: msg,
      ...arg,
    })
  },
}

export default tips
